package com.huangxt.test;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by HXT on 2019/7/31.
 */
public class RunnableTest1 implements Runnable{
    private int t;
    public RunnableTest1(int t){
        this.t = t;
    }
    private static final SimpleDateFormat format = new SimpleDateFormat("hh:mm:ss");
    public void run(){
        try{
            System.out.println(t+" "+format.format(new Date()));
            Thread.sleep(2*1000);
        }catch (Exception e){
            System.out.println((t*100)+" "+format.format(new Date()));
        }

    }
}
